package org.dromara.apartment.domain.bo;

import org.dromara.apartment.domain.LeaseAgreement;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 租约信息业务对象 lease_agreement
 *
 * @author CKJ
 * @date 2025-07-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = LeaseAgreement.class, reverseConvertGenerate = false)
public class LeaseAgreementBo extends BaseEntity {

    /**
     * 租约id
     */
    @NotNull(message = "租约id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 承租人手机号码
     */
    @NotBlank(message = "承租人手机号码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phone;

    /**
     * 承租人姓名
     */
    @NotBlank(message = "承租人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 承租人身份证号码
     */
    @NotBlank(message = "承租人身份证号码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String identificationNumber;

    /**
     * 签约公寓id
     */
    @NotNull(message = "签约公寓id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long apartmentId;

    /**
     * 签约房间id
     */
    @NotNull(message = "签约房间id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long roomId;

    /**
     * 租约开始日期
     */
    @NotNull(message = "租约开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date leaseStartDate;

    /**
     * 租约结束日期
     */
    @NotNull(message = "租约结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date leaseEndDate;

    /**
     * 租期id
     */
    @NotNull(message = "租期id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long leaseTermId;

    /**
     * 租金（元/月）
     */
    @NotNull(message = "租金（元/月）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer rent;

    /**
     * 押金（元）
     */
    @NotNull(message = "押金（元）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer deposit;

    /**
     * 支付类型id

     */
    @NotNull(message = "支付类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long paymentTypeId;

    /**
     * 租约状态（1:签约待确认，2:已签约，3:已取消，4:已到期，5:退租待确认，6:已退租，7:续约待确认）
     */
    @NotNull(message = "租约状态（1:签约待确认，2:已签约，3:已取消，4:已到期，5:退租待确认，6:已退租，7:续约待确认）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 租约来源（1:新签，2:续约）
     */
    @NotNull(message = "租约来源（1:新签，2:续约）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer sourceType;

    /**
     * 备注信息
     */
    private String additionalInfo;


}
